package top.lingkang.finaloauth.server.base.impl;

import top.lingkang.finaloauth.entity.OauthUser;
import top.lingkang.finaloauth.server.base.OauthUserLoginHandler;

import javax.servlet.http.HttpServletRequest;

/**
 * @author lingkang
 * Created by 2022/3/18
 */
public class OauthUserLoginDefaultHandler implements OauthUserLoginHandler {
    private static final String account="user";
    private static final String pwd="123456";
    @Override
    public OauthUser handler(String username, String password, HttpServletRequest request) {
        if (account.equals(username)&&pwd.equals(password)){
            OauthUser user=new OauthUser();
            user.setUsername(username);
            return user;
        }
        return null;
    }
}
